package br.com.dataphonebr.service;

import java.util.List;

import br.com.dataphonebr.exception.PersistenceException;

public interface IGenericService<E> {
	
	public String validatePersist(E entity);

	public String validateUpdate(E entity);

	public String validateDelete(Long id);
	
	public void beforePersist(E entity);

	public void beforeUpdate(E entity);
	
	public void beforeDelete(Long id);
	
	public void afterPersist(E entity) throws PersistenceException;
	
	public void afterUpdate(E entity) throws PersistenceException;
	
	public void afterDelete(Long id, E e);
	
	public List<E> selectAll();
	
	public Long save(E entity) throws PersistenceException;

	public Long merge(E entity) throws PersistenceException;
	
	public void persist(E entity) throws PersistenceException;
	
	public void update(E entity, Long id) throws PersistenceException;
	
	public void delete(Long id) throws PersistenceException;
	
	public E selectById(Long id);

	public String getColumnHack();




}
